<%--
  Created by IntelliJ IDEA.
  User: teacher
  Date: 2022/4/11
  Time: 17:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="entity.Emp"%>
<%@ page import="util.StringUtil" %>
<!--
    通过taglib指令引入自定义的tld文件
    uri属性:引入的tld文件的uri地址
    prefix属性:在调用时所使用的前缀
        配置了之后,调用该tld文件中的任意方法必须使用prefix所定义的前缀
        其值理论上可以随便写
        实际开发中,要求与tld文件的short-name一致
-->
<%@ taglib prefix="ems" uri="/ems/function" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改员工信息</title>
</head>
<body>
<h1>员工修改</h1>
<a href="${pageContext.request.contextPath}/findAll.emp">返回员工列表</a>
<hr/>
<form action="${pageContext.request.contextPath}/modify.emp" method="post">
    编号:<input type="text" name="id" value="${emp.id}" readonly/><br/>
    姓名:<input type="text" name="name" value="${emp.name}"/><br/>
    工资:<input type="text" name="salary" value="${emp.salary}"/><br/>
    性别:
    <input type="radio" name="gender" value="man" ${emp.gender eq "man" ? "checked" : ""}>男
    <input type="radio" name="gender" value="woman" ${emp.gender eq "woman" ? "checked" : ""}>女<br/>
    学历:
    <select name="edu">
        <option value="-1">请选择</option>
        <option value="1" ${emp.edu == "1" ? "selected" : ""}>大专</option>
        <option value="2" ${emp.edu == "2" ? "selected" : ""}>本科</option>
        <option value="3" ${emp.edu == "3" ? "selected" : ""}>研究生</option>
        <option value="4" ${emp.edu == "4" ? "selected" : ""}>博士生</option>
    </select><br/>
    兴趣:
    <input type="checkbox" name="hobbies" value="1" ${ems:ch(emp.hob,"1")}>吃饭
    <input type="checkbox" name="hobbies" value="2" ${ems:ch(emp.hob,"2")}>睡觉
    <input type="checkbox" name="hobbies" value="3" ${ems:ch(emp.hob,"3")}>打豆豆<br/>
    <input type="submit" value="修改">
</form>
</body>
</html>